
SET(FFMPEG_DIR ${THIRD_PARTY}/ffmpeg)

if (CMAKE_HOST_WIN32)
	
	if(CMAKE_SIZEOF_VOID_P EQUAL 8)
		SET(FFMPEG_DIR ${THIRD_PARTY}/ffmpeg/x64)
	endif()
	
	SET(FFMPEG_LIBRARY_DIR ${FFMPEG_DIR}/bin)
	SET(FFMPEG_LIBRARIES avutil avcodec avformat swresample avfilter swscale)
else()
	SET(FFMPEG_LIBRARY_DIR ${FFMPEG_DIR}/lib ${FFMPEG_DIR}/bin)
	
	if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
		SET(FFMPEG_LIBRARY_DIR ${THIRD_PARTY}/ffmpeg/arm ${FFMPEG_DIR}/lib ${FFMPEG_DIR}/bin)
	endif()

	if(CMAKE_TOOLCHAIN_FILE)
		SET(FFMPEG_LIBRARY_DIR ${THIRD_PARTY}/ffmpeg/arm ${FFMPEG_DIR}/lib ${FFMPEG_DIR}/bin)
	endif()
	
	SET(FFMPEG_LIBRARIES avutil-55 avcodec-57 avformat-57 swresample-2 avfilter-6 swscale-4)

endif()
